import service from '@/utils/request'

export const useTeacherSubmitApi = (data: any) => {
    if (data.id) return service.put('/sys/teacher', data)
    else return service.post('/sys/teacher', data)
}

export const useTeacherInfoApi = (id: any) => {
    return service.get('/sys/teacher/info/' + id)
}
export const useTeacherFileInfoApi = (id: any) => {
    return service.get('/t/teacher/info/u/' + id)
}
export const useTeacherListApi = () => {
    return service.get('/select/teacher')
}

export function useTeacherClassListApi(data: any){
    return service.get('/t/class/page', {
        params: data
    })
}
